#include<stdio.h>

int isBD(char c)
{
	if(c=='.') return 1;
	if(c==',') return 1;
	if(c=='!') return 1;
	if(c=='?') return 1;
	if(c==' ') return 1;
	return 0;
 } 

int main()
{
	int i=0;
	char s[100]="I like ,,,.. C++ programming!";
	while(s[i]!='\0')
	{
		while(isBD(s[i])==1&&s[i]!='\0')
		{
			i++;
		}
		int si=i;
		while(isBD(s[i])==0&&s[i]!='\0')
			i++;
		int ei=i-1;
		for(i=si;i<=ei;i++)
			printf("%c",s[i]);
		printf("\n");
	}
	return 0;
}
